package com.xiaoshuidi.cloud.module.contract.enums.contract;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * 签约主体状态的枚举类
 *
 * @author 合房源码
 */
@Getter
@AllArgsConstructor
public enum SigningSubjectStatusEnum {
    EFFECTIVE(1, "已生效"),
    REJECTED(2,"已驳回"),
    ;

    private Integer code;
    private String msg;

    public static String getName(Integer code) {
        for (SigningSubjectStatusEnum c : SigningSubjectStatusEnum.values()) {
            if (c.getCode().intValue() == code.intValue()) {
                return c.msg;
            }
        }
        return null;
    }
}
